package com.chinasosfti.demo;

import java.util.Scanner;


public class Student {
    public static void main(String[] args) {

        int arr[] = {1,3,5,67,8};

        int ac[]=ar(arr);
        System.out.println("大");
        System.out.println(ac[0]);
        System.out.println("小");
        System.out.println(ac[1]);
        System.out.println("平");
        System.out.println(ac[2]);

    }

    public static int[] ar(int[] arr) {
        int max=arr[0];
        int min=arr[0];
        for (int i=0;i< arr.length;i++){
            if (max<arr[i]){
                max=arr[i];
            }
            if (min>arr[i]){
                min=arr[i];
            }
        }
        int sc=0;
        for (int i=0;i< arr.length;i++){
            sc+=arr[i];
        }
        int tr[] ={max,min,sc/arr.length};
        return tr;
    }

}